<?PHP
session_start();
if (!(isset($_SESSION['login']) && $_SESSION['login'] != '')) {header ("Location: index.php");}

//NOW WE CHECK IF THE USER SUBMITTED A PETTYUPDATE
require 'addnew.php';
//require 'reconcheck.php'; 
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <title>iPetty</title>
  
  
  
  <link rel="stylesheet" href="/jquery/style.css">
  
  <!-- Extra Codiqa features -->
  <link rel="stylesheet" href="codiqa.ext.css">
   <link href="styling.css" rel="stylesheet" type="text/css">
  <!-- jQuery and jQuery Mobile -->

  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  <script src="https://d10ajoocuyu32n.cloudfront.net/jquery-1.9.1.min.js"></script>
  <script src="https://d10ajoocuyu32n.cloudfront.net/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>

  <!-- Extra Codiqa features -->
  <script src="https://d10ajoocuyu32n.cloudfront.net/codiqa.ext.js"></script>
 <script type="text/javascript"> 
 
		jQuery(document).ready(function(){
			$('#for').autocomplete({source:'autosuggest.php', minLength:2});
		});
 
	</script> 
</head>
<body>
<!-- Home -->
<div data-role="page" id="page1">

    <div data-theme="a" data-role="header">
        <h3>
           <?php echo $fcomname; ?> iPetty
        </h3>
      <?php //NAVBAR
		require 'navbar.php';
		
		 ?>
    </div>
    <? echo $notification;
	echo $errorMessage;
	 ?>
    <div data-role="content"><form action="home.php" method="POST" id="addpet">
        <div data-role="fieldcontain">
            <input name="amount"  id="amount" placeholder="Amount" value=""  required class="number">
        </div>
        <!--HERE I WANT AN AUTOCOMPLETE BASED ON WHICH COMPANY IS LOGGED IN, SO EACH USER, AS HE USES THE APP, THINGS GET ADDED TO THE AUTOCOMPLETE DATABASE-->
        <div data-role="fieldcontain">
            <input name="for" id="for" placeholder="Details" value="" type="text" required>
        </div>
    <!--     <div data-role="fieldcontain">
            <textarea name="comments" id="comments" placeholder="Any comments or Order Number perhaps?"></textarea>
        </div> -->
        <div data-role="fieldcontain">
            <input name="tdate" id="tdate" type="date" value="<?php echo date('Y-m-d'); ?>" />
        </div>
        <div id="meh" data-role="fieldcontain">

                
<select name="depwith" id="depwith" data-role="slider">
<option id="radio2" name="depwith"  value="withdraw">WITHDRAW</option>
	<option id="radio1" name="depwith"  value="deposit">DEPOSIT</option>
	
</select> 
                
                
           <!--     <br/> <br/>
                <input id="radio3" name="depwith" value="loan" type="radio">
                <label for="radio3">
                    Make Loan
                </label>
                 <input id="radio4" name="depwith" value="reloan" type="radio">
                <label for="radio4">
                    Repay Loan
                </label> -->
        </div>
        
 
    <!--    <input id="reset" type="reset" value="Reset"> -->
        <input id="submit" type="submit" value="Submit">
        </form>
        <script src="jquery.validate.js"></script>
<script>
$("#addpet").validate();
</script>
    </div>
</div>
</body>
</html>
